<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
input {
	border-top-right-radius: 5px;
	border-top-left-radius: 5px;
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
}

.div3 {
	border-top-right-radius: 30px;
	border-top-left-radius: 30px;
	border-bottom-left-radius: 30px;
	border-bottom-right-radius: 30px; width : 39%;
	height: 500px;
	float: left;
	font-size: 20px;
	background-color: rgba(150, 0, 0, 0.2);
	width: 39%;
}

p {
	height: 30px;
	line-height: 300px;
}
</style>
<script type="text/javaScript">
	function test(form) {
		var oldpassvalue = form.oldPassword.value;
		var newpassvalue = form.newPassword.value;
		var newpassvaluecon = form.newPasswordConfirm.value;
		var passt = /^\d{6,}$/;
		if (oldpassvalue == "" || newpassvalue == ""||newpassvalue == "") {
			alert("所有项为必填项！");
			document.getElementById('old').focus();
			return false;
		}
		var opt = passt.test(oldpassvalue);
		var npt = passt.test(newpassvalue);
		var nptc = passt.test(newpassvaluecon);
		if (!opt) {
			alert("旧密码必须为数字并且不少于6个！");
			document.getElementById('old').focus();
			return false;
		}
		if (!npt) {
			alert("新密码必须为数字并且不少于6个！");
			document.getElementById('old').focus();
			return false;
		}
		if (!nptc) {
			alert("新密码必须为数字并且不少于6个！");
			document.getElementById('old').focus();
			return false;
		}
		if(newpassvalue!=newpassvaluecon){
			alert("确认密码失败！");
			document.getElementById('old').focus();
			return false;
		}
		return true;
	}
</script>
</head>
<body background="pic/5-13050GZ015.gif"
	onload="document.getElementById('old').focus();">
	<div align="center">
		<img src="pic/a3cc7cd98d1001e9c7ad571eb00e7bec54e7970a.jpg" alt="Dory">
	</div>
	<div style="width: 30%; height: 500px; float: left;">
		<img src="pic/wsj2015-5.png" alt="HalloWeen">
	</div>
	<form action="UpdateP" method="post" onsubmit="return test(this)">
		<div class="div3" align="center">
		<p style="height: 30px;line-height: 200px;font-size:30px">检测到您是第一次登陆</p><p style="height: 30px;line-height: 200px;font-size:30px">为了您的账号安全，请修改密码！</p>
		<input type = "hidden" name="stuId" value = "">
			<p>
				旧&nbsp&nbsp&nbsp&nbsp密&nbsp&nbsp&nbsp&nbsp码：&nbsp&nbsp<input
					type="password" name="oldPassword" id="old"
					style="width: 300px; height: 20px;">
			</p>
			<p>
				新&nbsp&nbsp&nbsp&nbsp密&nbsp&nbsp&nbsp&nbsp码：&nbsp&nbsp<input
					type="password" name="newPassword" style="width: 300px; height: 20px;">
			</p>
			<p>
				确认新密码：&nbsp&nbsp<input type="password" name="newPasswordConfirm"
					style="width: 300px; height: 20px;">
			</p>
			<p>
				<input type="submit" value="确认" style="width: 50px; height: 30px;">
				<input type="reset" value="取消" style="width: 50px; height: 30px;"
					onclick="document.getElementById('old').focus();">
			</p>
		</div>
	</form>
	<div style="width: 30%; height: 500px; float: left;">
		<img src="pic/wsj2015-3.png" alt="HalloWeen">
	</div>
</body>
</html>